<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head th:replace="~{common::header('采购计划明细信息')}"></head>
<body>
<div class="container-fluid">
    <div class="row clearfix">
        <div class="col-md-12 column" style="text-align: center">
            <h3>
                采购计划明细信息
            </h3>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <hr>
        </div>
    </div>

    <form class="form-horizontal" id="ff" method="post">
        <table class="table table-striped table-condensed table-condensed">
            <tr>
                <td class="col-md-6">
                    <div class="col-md-4 column">
                        <label for="cgjhbh" class="control-label">采购计划编号</label>
                    </div>
                    <div class="col-md-8 column">
                        <input readonly th:value="${stock.stockNum}" type="text"  class="form-control" name="stockNum" id="cgjhbh">
                    </div>
                </td>
                <td class="col-md-6">
                    <div class="col-md-4 column">
                        <label for="cgjhmc" class="control-label">采购计划名称</label>
                    </div>
                    <div class="col-md-8 column">
                        <input name="id" type="text" hidden>
                        <input title="采购计划名称" readonly th:value="${stock.stockName}"  name="stockName" type="text" class="form-control" id="cgjhmc">
                    </div>
                </td>
            </tr>
            <tr>
                <td class="col-md-6">
                    <div class="col-md-4 column">
                        <label for="gsmc" class="control-label">公司名称</label>
                    </div>
                    <div class="col-md-8 column">
                        <input readonly name="materialCode" value="天啸公司"  type="text" class="form-control" id="gsmc">
                    </div>
                </td>
                <td class="col-md-6">
                    <div class="col-md-4 column">
                        <label for="bzr" class="control-label">编制人</label>
                    </div>
                    <div class="col-md-8 column">
                        <input title="编制人" type="text" readonly th:value="${stock.author}" class="form-control" name="author" id="bzr">
                        <input type="text"  hidden th:value="${stock.authorId}" name="authorId">
                    </div>
                </td>
            </tr>
            <tr>
                <td class="col-md-6" colspan="2">
                    <div class="col-md-2 column">
                        <label for="ysje" class="control-label">预算金额(元)</label>
                    </div>
                    <div class="col-md-4 column">
                        <input title="预算金额(元)" readonly th:value="${stock.budget}" type="number" min="1.00" step="1.00" name="budget" class="form-control" id="ysje">
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table class="table table-striped table-condensed table-bordered table-hover">
                        <tr>
                            <td>序号</td>
                            <td>物资编码</td>
                            <td>物资名称</td>
                            <td>数量</td>
                            <td>计量单位</td>
                            <td>交货期</td>
                            <td>协议价格(元)</td>
                            <td>预算总金额(元)</td>
                            <td>计划价(元/不含税)</td>
                        </tr>
                        <tr th:each="user,index:${orders}">
                            <td th:text="${index.index+1}"></td>
                            <td th:text="${user.id}" hidden name="orders"></td>
                            <td th:text="${user.materialCode}" id="code"></td>
                            <td th:text="${user.materialName}"></td>
                            <td th:text="${user.amount}"></td>
                            <td th:text="${user.measureUnit}"></td>
                            <td th:text="${user.endDate}"></td>
                            <td></td>
                            <td th:text="${user.sumPrice}" name="sum"></td>
                            <td></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="col-md-6" >
                    <div class="col-md-4 column">
                        <label for="cgfs" class="control-label" style="color: red">采购方式</label>
                    </div>
                    <div class="col-md-8 column">
                        <select class="form-control"  name="stockType" readonly disabled="disabled"  id="cgfs">
                            <option th:selected="${stock.stockType=='C000-1'}"  value="C000-1">公开求购</option>
                            <option th:selected="${stock.stockType=='C000-2'}" value="C000-2">定向询价</option>
                        </select>
                    </div>
                </td>
                <td class="col-md-6">

                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table class="table table-striped table-condensed table-bordered table-hover">
                        <tr>
                            <td>供应商编号</td>
                            <td>供应商证书</td>
                            <td>供应商名称</td>
                            <td>公司性质</td>
                            <td>联系人</td>
                            <td>电话</td>
                            <td>传真</td>
                            <td>电子邮件</td>
                            <td>联系地址</td>
                            <td>邮编</td>
                            <td>注册资金</td>
                            <td>法人代表</td>
                            <td>业绩</td>
                        </tr>
                        <tr th:each="user,index:${suppliers}">
                            <td th:text="${user.id}" hidden name="orders"></td>
                            <td th:text="${user.supplierNum}" id="code"></td>
                            <td th:text="${user.certificate}"></td>
                            <td th:text="${user.company}"></td>
                            <td th:text="${user.kind}"></td>
                            <td th:text="${user.contact}"></td>
                            <td th:text="${user.phone}"></td>
                            <td th:text="${user.fax}"></td>
                            <td th:text="${user.email}"></td>
                            <td th:text="${user.address}"></td>
                            <td th:text="${user.zip}"></td>
                            <td th:text="${user.regFund}"></td>
                            <td th:text="${user.corporation}"></td>
                            <td th:text="${user.achievement}"></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="col-md-6" colspan="2">
                    <div class="col-md-2 column">
                        <label for="sm" class="control-label">说明</label>
                    </div>
                    <div class="col-md-10 column">
                        <textarea class="form-control" id="sm" name="remark" style="resize:none" readonly th:text="${stock.remark}" rows="3"></textarea>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="col-md-2 column">
                        <label for="shjg" class="control-label">审核结果</label>
                    </div>
                    <div class="col-md-4 column">
                        <input title="审核结果" type="text" th:if="${stock.leadAgree=='S002-01'}" readonly value="驳回" class="form-control" name="author" id="shjg">
                        <input title="审核结果" type="text" th:if="${stock.leadAgree=='S002-02'}" readonly value="废弃" class="form-control" name="author" id="shjg">
                        <input title="审核结果" type="text" th:if="${stock.leadAgree=='S002-1'}" readonly value="同意" class="form-control" name="author" id="shjg">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="col-md-4 column">
                        <label for="shr" class="control-label">审核人</label>
                    </div>
                    <div class="col-md-8 column">
                        <input title="审核人" type="text" readonly th:value="${stock.leader}" class="form-control" name="author" id="shr">
                    </div>
                </td>
                <td>
                    <div class="col-md-4 column">
                        <label for="shsj" class="control-label">审核时间</label>
                    </div>
                    <div class="col-md-5 column">
                        <input title="部长意见" type="text"  readonly th:value="${stock.leadDate}" class="form-control" name="author" id="shsj">
                    </div>
                </td>
            </tr>
            <tr>
                <td class="col-md-6" colspan="2">
                    <div class="col-md-2 column">
                        <label for="sm" class="control-label">说明</label>
                    </div>
                    <div class="col-md-10 column">
                        <textarea class="form-control" id="sm" name="remark" style="resize:none" readonly th:text="${stock.leadOpinion}" rows="3"></textarea>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <button type="button" class="btn btn-primary btn-sm" onclick="window.close()">返回</button>
                </td>
            </tr>
        </table>
    </form>
</div>

</body>
</html>